﻿namespace Cubicle.Core.Repository.HandleParsers
{
    public abstract class ExcelHandleParserBase : HandleParserBase
    {
        public readonly string Name = "";
        public readonly char Separator = ':';
        protected readonly string SeparatorStr = ":";

        protected ExcelHandleParserBase(char prefix, string name)
            : base(prefix)
        {
            Name = name;
        }

        private static object _lock = new object();
        private static int _counter = 65536;
        public static int GetCounter()
        {
            lock (_lock)
            {
                return _counter++;
            }
        }

        public static string GetNextNumber()
        {
            return GetCounter().ToString("X");
        }
    }
}